Skip to main content

All Questions

Tagged with
0votes
0answers
46views

How do I restore a cancelled command to buffer after hitting Ctrl-C?

Sometimes I hit Ctrl+C on the command line to cancel a command that hasn't been executed yet. But if I regret cancelling the command this way, how can I restore it and continue writing it, in zsh?
xuhdev's user avatar
2votes
2answers
193views

turning list of file paths from one command into command-line arguments for another

I want to pass a list of file paths produced by one command (the KDE baloosearch6 program) as command-line arguments to another command (the KDE gwenview image viewer program). The age-old problem is ...
skierpage's user avatar
1vote
0answers
36views

Going to the direcory of a file as fast as posible [duplicate]

Is there a way to get to the path of a file as fast as possible and in the least amount of keystrokes. Context: Type cd and then paste the path of a file and then have to go back and hit backspace ...
GumGun's user avatar
0votes
1answer
128views

How to specify that an optional argument requires 2 arguments in a zsh competition script?

I am writing a custom competition function for zsh. Currently, I have the following code _arguments \ ... '(-G --glitchpct)'{-G+,--glitchpct=}'[Controls how often the characters on screen glitch]' I ...
Alex.Kh's user avatar
0votes
1answer
298views

Permission denied error when starting terminal

I'm getting this error when I start my terminal: /home/USERNAME/.config/envman/PATH.env:2: permission denied: /home/USERNAME/.local/bin this is my .zshrc file: # Enable Powerlevel10k instant prompt. ...
Ilgar's user avatar
4votes
2answers
908views

Combine two files as part of a command line parameter

I am trying to use csvgrep (part of csvkit) to extract rows matching one of two files. Unfortunately, there is no command line option that allows two matching files (like grep does). Only, csvgrep -f ...
Robert Altman's user avatar
1vote
0answers
257views

zsh: access history from other zsh sessions, but only by a select method, not by default (i.e. reverse incremental search, history stack)

Please bear with me, this is not just another question about basic history control options, and I think it has a solid use case. Use case I have many instances of zsh running (tmux with tmux continuum ...
Life5ign's user avatar
1vote
0answers
148views

How to enable sh emulation mode only when using zsh interactively

When using zsh interactively, I would like it to emulate the behavior of sh as much as possible. I have tried adding emulate sh to the end of ~/.zshrc, but since I am using zsh plugins that rely on ...
Flux's user avatar
  • 3,198
2votes
1answer
109views

How to edit and execute a couple of commands from shell history?

Every now and then I want to recycle a command sequence I recently used, after I adapted it. Let's imagine, yesterday I executed foo 42 bar with some strange arguments baz /my/most/beloved/folder Now ...
Philippos's user avatar
3votes
1answer
163views

Zsh - What is this Cool Thing called you get by pressing Tab after "("

Short Version If you press tab after the following command you get a filer-menu. What is the name of it? ls *( Long Version I just doing my linux-stuff and by accident I pressed tab after ( and a ...
Bog's user avatar
  • 1,124
0votes
1answer
243views

Zsh script to recursively unrar into a folder with the same name [duplicate]

Is it possible to use a zsh script to unrar all directories within another directory? As follows: dir |_dir1.rar |_dir2.rar |_dir3.rar I would like the command not to include the cd. I will cd into ...
linuxuser24569's user avatar
14votes
9answers
3kviews

How to select a sub-range of the files in the current directory in a script/on the command line, based on e.g. alphabetical order?

In a file manager you can usually select a file, then hold Shift and select another file. Every file in between will be selected. I want to do the bash / zsh equivalent of this. I.e: I want to give 2 ...
Csaba Dunai's user avatar
0votes
2answers
223views

Syntax or convention used to describe Linux commands

If you apply git clone --help in the command line, your result will include something like the following: git clone [--template=<template_directory>] [-l] [-s] [--no-hardlinks] [-q] ...
Guru's user avatar
8votes
2answers
2kviews

What is the convention for options/questions in terminal?

When exploring some of the flags associated with mv in zsh terminal, I encountered the following prompt: overwrite untitled folder 2/test.txt? (y/n [n]) My question is what is the second n in brackets ...
T. Kent's user avatar
0votes
2answers
603views

Within an AWS CLI command, add the ISO 8601 datetime

As a fun side project, I'm building a serverless Todo application on AWS. I do a lot in the terminal, but my knowledge is basic. The command to add something into my DynamoDB table via the AWS CLI (v2....
J86's user avatar
  • 403

153050per page
close